package com.sun.showcase.client.domain.mall;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

public class Distribution implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
    /**
     * ID       db_column: id 
     */	
	private java.lang.String id;
    /**
     * 商品id       db_column: goods_id 
     */	
	private java.lang.String goodsId;
    /**
     * 商品名       db_column: goods_name 
     */	
	private java.lang.String goodsName;
    /**
     * 店铺id       db_column: shop_id 
     */	
	private java.lang.String shopId;
    /**
     * 店铺名       db_column: shop_name 
     */	
	private java.lang.String shopName;
    /**
     * 比例       db_column: rate 
     */	
	private Double rate;
    /**
     * 分销层级       db_column: level 
     */	
	private java.lang.Integer level;
    /**
     * 创建时间       db_column: create_date 
     */	
	private java.util.Date createDate;
	//columns END

	public Distribution(){
	}

	public Distribution(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setGoodsId(java.lang.String value) {
		this.goodsId = value;
	}
	
	public java.lang.String getGoodsId() {
		return this.goodsId;
	}
	public void setGoodsName(java.lang.String value) {
		this.goodsName = value;
	}
	
	public java.lang.String getGoodsName() {
		return this.goodsName;
	}
	public void setShopId(java.lang.String value) {
		this.shopId = value;
	}
	
	public java.lang.String getShopId() {
		return this.shopId;
	}
	public void setShopName(java.lang.String value) {
		this.shopName = value;
	}
	
	public java.lang.String getShopName() {
		return this.shopName;
	}
	public void setRate(Double value) {
		this.rate = value;
	}
	
	public Double getRate() {
		return this.rate;
	}
	public void setLevel(java.lang.Integer value) {
		this.level = value;
	}
	
	public java.lang.Integer getLevel() {
		return this.level;
	}
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Distribution == false) return false;
		if(this == obj) return true;
		Distribution other = (Distribution)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

